package com.example.timetable;

import androidx.appcompat.app.AppCompatActivity;
import androidx.slidingpanelayout.widget.SlidingPaneLayout;


import android.os.Bundle;
import android.view.Window;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.timetable.method.AlertManage;
import com.example.timetable.method.Database;

import butterknife.ButterKnife;
import butterknife.OnClick;

@Route(path="/TimeTable/MainActivity")
public class MainActivity extends AppCompatActivity {

    private SlidingPaneLayout slidingPaneLayout;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE); //去除标题栏
        setContentView(R.layout.activity_main);
        ARouter.openLog();
        ARouter.openDebug();
        ARouter.init(getApplication());
        ButterKnife.bind(this);
        slidingPaneLayout=findViewById(R.id.main_slid);
        slidingPaneLayout.setParallaxDistance(200);
        AlertManage alertManage=new AlertManage();
        alertManage.initAlert(this,"");
    }
    @OnClick(R.id.btn_house)
    public void clickHouse(){
        if(!slidingPaneLayout.isOpen())
            slidingPaneLayout.openPane();
    }
    @OnClick(R.id.btn_add)
    public void clickAdd(){
        ARouter.getInstance().build("/TimeTable/TimeTableCreate").navigation();
    }

}
